#ifndef USERINFO_H
#define USERINFO_H

#include <QMainWindow>
#include <QJsonObject>


QT_BEGIN_NAMESPACE
namespace Ui { class UserInfo; }
QT_END_NAMESPACE

class UserInfo : public QMainWindow
{
    Q_OBJECT

public:
    UserInfo(QWidget *parent = nullptr);
    ~UserInfo();


    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);

    void initUserInfo();
    bool saveUserInfo();
    void submit();

    //记录鼠标，窗口位置
    QPoint windowPos;
    QPoint mousePos;
    QPoint dPos;



private:
    Ui::UserInfo *ui;

 typedef struct{
    QString username;
    QString height;
    QString weight;
    QString sex;
    QString birth;
    QString phone;
    QString shoeSize;
    QString option;
    QString mode;
    QString applicant;
    QString checker;
  }USER;

    USER user;
private slots:

    void on_btn_cannel_clicked();

    void on_btn_submit_clicked();

signals:
    void sendUserInfo(QJsonObject);//发送用户数据
};
#endif // USERINFO_H
